#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
	int a, b, c;
	cin >> a >> b >> c;
	int x = max(a, max(b, c));
	int y = min(a, min(b, c));
	int z = a + b + c - x - y;
	cout << y << endl;
	cout << z << endl;
	cout << x << endl;
	cout << endl;
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
	return 0;
}